package org.caw.domain;

import java.io.Serializable;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "family")
public class Family implements Serializable {

	private static final long serialVersionUID = -5630363644882405056L;

	@XmlElement(name = "name")
	private String name;

	@XmlElement(name = "qualifier")
	private List<Qualifier> qualifiers;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<Qualifier> getQualifiers() {
		return qualifiers;
	}

	public void setQualifiers(List<Qualifier> qualifiers) {
		this.qualifiers = qualifiers;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof Family && ((Family) obj).getName().equals(getName())) {
			return true;
		}
		return super.equals(obj);
	}
}
